package service.properties;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

public class ConfigurationCheminsProperties {
	private static ConfigurationCheminsProperties configurationCheminsProperties = new ConfigurationCheminsProperties();
	private static Properties props;

	private ConfigurationCheminsProperties() {
		ClassLoader cl = Thread.currentThread().getContextClassLoader();
		InputStream is = cl.getResourceAsStream("./config/chemins.xml");
		
		ConfigurationCheminsProperties.props = new Properties();
		try {
			ConfigurationCheminsProperties.props.loadFromXML(is);
			is.close();
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	public static String getRessource(String cle) {
		return ConfigurationCheminsProperties.props.getProperty(cle);
	}
}
